import request from '@/utils/request'

// 查询插件列列表
export function listKnowledge(query) {
  return request({
    url: '/ai/knowledge/list',
    method: 'get',
    params: query
  })
}

// 查询插件列详细
export function getKnowledge(id) {
  return request({
    url: '/ai/knowledge/' + id,
    method: 'get'
  })
}

// 新增插件列
export function addKnowledge(data) {
  return request({
    url: '/ai/knowledge',
    method: 'post',
    data: data
  })
}

// 修改插件列
export function updateKnowledge(data) {
  return request({
    url: '/ai/knowledge',
    method: 'put',
    data: data
  })
}

// 删除插件列
export function delKnowledge(id) {
  return request({
    url: '/ai/knowledge/' + id,
    method: 'delete'
  })
}

//查看知识库详情
export function checkKnowledge(query){
  return request({
    url: '/ai/knowledge/checkKnowledge/' + query.id + '/' + query.page + '/' + query.size,
    method: 'get'
  })
}
